python find first occurrence in list

30

next(obj for obj in objs if obj.val == 5)

Comments

Submit
0 Comments